package com.rtzh.learnkotlin.ui

import android.content.Intent
import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import com.rtzh.learnkotlin.R
import kotlinx.android.synthetic.main.activity_main.*
import com.rtzh.learnkotlin.ui.MainActivity as MainActivity1

/**
 * 登录界面
 */
class MainActivity : AppCompatActivity(), View.OnClickListener {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        btn_tv_opne_recycler.setOnClickListener(this)
        btn_opne_msg_recycler.setOnClickListener(this)
        btn_broadcast_log_out_activity.setOnClickListener(this)

    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.btn_tv_opne_recycler -> {
                startActivity(Intent(this, RecyclerViewActivity::class.java))
            }
            R.id.btn_broadcast_log_out_activity -> {
                startActivity(Intent(this,LoginActivity::class.java))
            }
            R.id.btn_opne_msg_recycler->{
                startActivity(Intent(this,UiBestPracticeActivity::class.java))
            }
        }
    }

}